<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./js/jquery-1.8.3.min.js"></script>
    <script src="./js/common.js"></script>
</head>
<body>
productInfo
<hr>
<table border="1" id="tab">
    <tr>
        <td>ProductImg</td>
        <td>ProductName</td>
        <td>Price</td>
    </tr>
</table>
</body>
</html>
<style>
    #tab img{
        width: 40px;
        height: 40px;
    }
</style>
<script>
    $(function () {
        var json = parseUrl();
        $.ajax({
            url: "product/findByTypeId",
            type: "get",
            dataType: "json",
            data: {"typeId":json.typeId},
            success: function (resp) {
                // console.log(resp.state);
                // console.log(resp.data.length);
                var productList = resp.data;
                if(resp.state == "success"){
                    for(var i=0; i<productList.length; i++)
                    $("#tab").append(
                        "<tr>" +
                            "<td><img src='./img/"+productList[i].proImg+"'></td>"+
                            "<td>"+productList[i].proName+"</td>"+
                            "<td>"+productList[i].price+"</td>"+
                        "</tr>"
                    )
                }
            }
        })
    })
</script>